home *** CD-ROM | disk | FTP | other *** search
/ Moving Worlds - Companion / Moving Worlds.iso / sapphire / install < prev    next >
Encoding:
Text File  |  1996-04-09  |  7.8 KB  |  383 lines

  1. #!/bin/sh
  2. #set -x
  3. clear
  4. PATH=$PATH:/usr/sbin:/usr/ucb ; export PATH
  5.  
  6. # Function to inform users of postscript location #
  7. access_docs()
  8. {
  9. cat << END
  10. This distribution includes postscript documentation which can be printed or
  11. copied directly from the CD. Please change directory to the following path
  12. to retrieve the post script files:
  13.  
  14.     $CDROM/SAPPHIRE/postscript_docs_1.1
  15.  
  16.     where CDROM is the mount point for your CD.
  17.  
  18. Installation.ps    -->  Sapphire/Web Installation Guide V1.1 for Unix
  19. GettingStarted.ps  -->  Getting Started with Sapphire/Web V1.1 for Unix
  20. Reference          -->  Sapphire/Web Reference Manual V1.1 for Unix
  21.  
  22. END
  23. press_return
  24. clear
  25. }
  26. ########### Get The Architecture and tar product #######################
  27.  
  28. ARCH=`uname -sr` 
  29.  
  30.   case $ARCH in
  31.  
  32.     "SunOS 4.1."* | "SunOS 5."* | HP-UX*) 
  33.     ECHON="echo -n"
  34.     ;;
  35.  
  36.     AIX* | IRIX* | OSF*)
  37.     ECHON="echo"
  38.     ;;
  39.  
  40.   esac
  41.  
  42. # Press return to continue...
  43. press_return()
  44. {
  45.   $ECHON "Press Return to continue..."
  46.    read junk
  47. }
  48.  
  49. arch_menu()
  50. {
  51. clear
  52. echo ""
  53. echo ""
  54. echo  "1) SUN OS 4.1.X"
  55. echo  "2) SUN SOLARIS 5.X"
  56. echo  "3) IRIX 5.X"
  57. echo  "4) HP-UX 9000"
  58. echo  "5) HP-UX 10000"
  59. echo  "6) AIX 3.2.X"
  60. echo  "7) AIX 4.1.X"
  61. echo  "8) DEC ALPHA 3.2.X"
  62. echo  "__________________"
  63. $ECHON "Enter the number for your Architecture: "
  64. read ans
  65.   case $ans in
  66.     
  67.     1) 
  68.     ARCH="SunOS 4.1.X"
  69.     ;;
  70.  
  71.     2)
  72.     ARCH="SunOS 5.X"
  73.     ;;
  74.  
  75.     3) 
  76.     ARCH="IRIX 5.3"
  77.     ;;
  78.  
  79.     4)
  80.     ARCH="HP-UX A.09.0"
  81.     ;;
  82.       
  83.     5)
  84.     ARCH="HP-UX B.10.01"
  85.     ;;
  86.  
  87.     6)
  88.     ARCH="AIX 1"
  89.     ;;
  90.  
  91.     7)
  92.     ARCH="AIX 2"
  93.     ;;
  94.  
  95.     8)
  96.     ARCH="OSF1 V3.2"
  97.     ;;
  98.  
  99.   esac
  100. }
  101.  
  102. check_ans()
  103. {
  104. while [ ${ans:=0} != n -a $ans != y ]
  105. do
  106. $ECHON "Please enter y or n: "
  107. read ans
  108. done
  109. }
  110.  
  111. arch_ans()
  112. {
  113.   if [ $ans = "n" ] || [ $ans = "no" ]
  114.     then
  115.     arch_menu
  116.   fi 
  117. }
  118.  
  119. cat << END
  120. *****************************************************************************
  121. *** Bluestone Saphire/Web CD - Volume 1 - Installation Program
  122. *****************************************************************************
  123.  
  124. Welcome to Bluestone Sapphire/Web Volume 1.  Thank you for choosing Bluestone
  125. as your software vendor.  If you need help with the installation of this
  126. product, use your Serial Number to surf the acclaimed Explorer/Web:
  127.  
  128.    http://www.bluestone.com/support
  129.  
  130. or send e-mail to:
  131.  
  132.    support@bluestone.com
  133.  
  134. Otherwise, you can contact us during regular business hours:
  135.  
  136.              Product Sales           Technical Support
  137.  
  138.    Phone:    (609) 727-4600          (609) 778-7900
  139.    Fax:      (609) 778-8125          (609) 234-2877
  140.  
  141. *****************************************************************************
  142.  
  143. END
  144. press_return
  145. clear
  146. echo "**********************************************************************************"
  147. echo "*** Select CD-ROM Mount Point"
  148. echo "***********************************************************************************"
  149. echo "This install script assumes that your CD-ROM drive is currently mounted on: "
  150. echo ""
  151. echo "    /cdrom"
  152. echo ""
  153. $ECHON "Is this correct: [y/n]: "
  154. read ans
  155.  
  156.    if [ "$ans" = "y" ] || [ "$ans" = "Y" ] || [ "$ans" = "yes" ] || \
  157.                 [ "$ans" = "" ]
  158.         then CDDIR=/cdrom
  159.  
  160.         else
  161.     echo ""
  162.     echo ""
  163.         $ECHON "Please enter the pathname for your CD-ROM root directory: "
  164.         read CDDIR
  165.  
  166.         fi
  167. echo ""
  168. echo ""
  169.  
  170. case $ARCH in
  171.  
  172.  "SunOS 4.1."*)
  173. echo "You are running on SUN OS 4.1.X Architecture.  Is this the"
  174. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  175. read ans
  176. check_ans
  177. arch_ans
  178.         ;;
  179.  
  180.  "SunOS 5."*)
  181. echo "You are running on SUN SOLARIS 5.X  Architecture.  Is this the"
  182. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  183. read ans
  184. check_ans
  185. arch_ans
  186.         ;;
  187.  
  188.  "HP-UX A.09.0"*)
  189. echo "You are running on HP-UX 9000 Architecture.  Is this the"
  190. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  191. read ans
  192. check_ans
  193. arch_ans
  194.         ;;
  195.  
  196.  "IRIX 5.3")
  197. echo "You are running on IRIX 5.X Architecture.  Is this the"
  198. $ECHON "platform on which you want to run Sapphire 1.1? y/n]: "
  199. read ans
  200. check_ans
  201. arch_ans
  202.         ;;
  203.  
  204.  "HP-UX B.10.01")
  205. echo "You are running on HP-UX 10000 Architecture.  Is this the"
  206. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  207. read ans
  208. check_ans
  209. arch_ans
  210.         ;;
  211.  
  212.  "OSF1 V3.2")
  213. echo "You are running on DEC ALPHA 3.X Architecture.  Is this the"
  214. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  215. read ans
  216. check_ans
  217. arch_ans
  218.         ;;
  219.  
  220.  "AIX 1")
  221. echo "You are running on AIX 4.1.X Architecture.  Is this the"
  222. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  223. read ans
  224. check_ans
  225. arch_ans
  226.         ;;
  227.  
  228.  "AIX 2")
  229. echo "You are running on AIX 3.2.X Architecture.  Is this the"
  230. $ECHON "platform on which you want to run Sapphire 1.1? [y/n]: "
  231. read ans
  232. check_ans
  233. arch_ans
  234.         ;;
  235. esac
  236.  
  237. echo ""
  238. echo ""
  239. echo "Please enter the destination directory for Sapphire 1.1: "
  240. read PRODDIR
  241.  
  242.  while [ 1 ]
  243.  do
  244.   if [ -d $PRODDIR ]
  245.    then
  246.    echo ""
  247.    echo ""
  248.    echo "You specified that you want to install Sapphire 1.1"
  249.    echo "into $PRODDIR"
  250.    echo ""
  251.    $ECHON "Is this correct? [y]: "
  252.    read ans
  253.  
  254.    case $ans in
  255.       y|Y|yes|YES|"")
  256.         if [ -w $PRODDIR ]
  257.           then
  258.             break
  259.           else
  260.             echo ""
  261.             echo ""
  262.             echo "You do not have write privileges to $PRODDIR.  You need to "
  263.             echo "either change the write privileges on $PRODDIR or run this"
  264.             echo "installation as root."
  265.             echo ""
  266.             echo ""
  267.          fi
  268.       continue
  269.       ;;
  270.       n|N|no|NO)
  271.         $ECHON "Please re-enter the destination product directory: "
  272.         read PRODDIR
  273.         ;;
  274.    esac
  275.  
  276.   else
  277.    echo ""
  278.    echo ""
  279.    echo "The directory $PRODDIR does not exist."
  280.    echo ""
  281.    echo "Would you like to create the directory"
  282.    $ECHON "$PRODDIR now? [y/n]: "
  283.    read ans
  284.  
  285.    if [ "$ans" = "y" ] || [ "$ans" = "" ] || [ "$ans" = "yes" ] || \
  286.                 [ "$ans" = "YES" ]
  287.    then
  288.      mkdir -p $PRODDIR
  289.      continue
  290.    else                 # Answer is no, then
  291.      echo ""
  292.      echo "Please re-enter the destination directory for Sapphire 1.1: "
  293.      read PRODDIR
  294.      continue
  295.    fi
  296.  
  297.  fi # matches if [ -d "$PRODDIR" ]
  298. done
  299.  
  300. cd $PRODDIR
  301.  
  302. echo "**************  Now tarring Sapphrie/Web Files  *************************"
  303.  
  304. case $ARCH in
  305.  
  306.         "SunOS 4.1."*)
  307.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/sunsparcOs413.tar
  308.         ;;
  309.  
  310.         "SunOS 5."*)
  311.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/sunsparcSol230.tar
  312.         ;;
  313.  
  314.         "HP-UX A.09.0"*)
  315.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/hp9-700Hpux900.tar
  316.         ;;
  317.  
  318.         "IRIX 5.3")
  319.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/sgiIrix530.tar
  320.         ;;
  321.  
  322.         "HP-UX B.10.01")
  323.     tar xvf /$CDDIR/SAPPHIRE/sapphire1.1/hp9-700Hpux100.tar
  324.         ;;
  325.  
  326.         "OSF1 V3.2")
  327.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/decalphaOsf320.tar
  328.         ;;
  329.  
  330.         "AIX 1")
  331.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/ibmrs6000Aix413.tar
  332.         ;;
  333.  
  334.     "AIX 2")
  335.     tar xvf $CDDIR/SAPPHIRE/sapphire1.1/ibmrs6000Aix325.tar
  336.     ;;
  337.  
  338.   esac
  339. clear
  340. $ECHON "Would you like to run the Sapphire 1.1 Install Script now? [y/n]: "
  341. read ans
  342.  
  343.   case $ans in
  344.  
  345.     y|Y|yes|YES)
  346.     SAPPHIRE=$PRODDIR ; export SAPPHIRE
  347.     $PRODDIR/Install
  348.     ;;
  349.  
  350.     n|N|no|NO)
  351.     ;;
  352.  
  353.   esac
  354.  
  355. clear
  356. access_docs
  357.  
  358.        cat << END
  359. *****************************************************************************
  360. *** Exiting CD-ROM Installation Program
  361. *****************************************************************************
  362.  
  363. If you need help, use your Serial Number to surf the acclaimed Explorer/Web:
  364.  
  365.    http://www.bluestone.com/support
  366.  
  367. or send e-mail to:
  368.  
  369.    support@bluestone.com
  370.  
  371. Otherwise, you can contact us during regular business hours:
  372.  
  373.              Product Sales           Technical Support
  374.  
  375.    Phone:    (609) 727-4600          (609) 778-7900
  376.    Fax:      (609) 778-8125          (609) 234-2877
  377.  
  378. *****************************************************************************
  379.  
  380. END
  381.  
  382.  
  383.